<?php

/**
 * AlimenNin form base class.
 *
 * @package    form
 * @subpackage alimen_nin
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 8807 2008-05-06 14:12:28Z fabien $
 */
class BaseAlimenNinForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'          => new sfWidgetFormInputHidden(),
      'numhistoria' => new sfWidgetFormPropelSelect(array('model' => 'Historia', 'add_empty' => false)),
      'alimento'    => new sfWidgetFormInput(),
      'tiempo'      => new sfWidgetFormDate(),
    ));

    $this->setValidators(array(
      'id'          => new sfValidatorPropelChoice(array('model' => 'AlimenNin', 'column' => 'id', 'required' => false)),
      'numhistoria' => new sfValidatorPropelChoice(array('model' => 'Historia', 'column' => 'id')),
      'alimento'    => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'tiempo'      => new sfValidatorDate(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('alimen_nin[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'AlimenNin';
  }


}
